<?
$return_url = (isset($_REQUEST['return_url']))? $_REQUEST['return_url'] : '';
$ticket = (isset($_REQUEST['ticket']))? $_REQUEST['ticket'] : NULL;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setup your Daylife Pages Account</title>
<link rel="stylesheet" type="text/css" href="/dialogs/dialogs.css">
</head>

<body>
<img class="logo" src="../media/Daylifepages.gif" width="250" height="50" />
<div class="dialog_content">
<h1>Log in and setup your Daylife Pages Account</h1>
              <p><b>Please enter a valid username and password for your daylife.com account.</b>
            <a href="http://www.daylife.com/register" target="_blank">Don't have a daylife account? My goodness! <b>Get one!</b></a></p>

<?
if (isset($_REQUEST['error']) && $_REQUEST['error'] === '-1') {
?>
<font color="red"><b>Invalid daylife.com username/password</b></font>
<?
}
?>

<form method="post" name="login" id="login" action="tpb/tpb-admin.php">
            <?
            if ((isset($_GET['login'])) && ($_GET['login'] === 'false')) {
            ?>
            <div class="error">
              That didn't work. Try again.
            </div>
<?
            }
            ?>
        
            <div class="form-row">
                <div class="form-label">Enter your daylife.com email address:
                  <input type="text" name="email_address" class="textfield" value="" />
            </div>
                  <br>
            </div>
            <div class="form-row">
                <div class="form-label">Enter your daylife.com password:
                  <input type="password" name="password" class="textfield" value="" />
            </div>
                  <br>
            </div>
            <div class="form-row">
                <div class="form-label">Pick a domain name for your Daylife Pages account: http://
                  <input type="text" name="subdomain" class="textfield" value="" />
                .endeepen.com/topic/Barack+Obama </div>
            </div>
            <br><br>

			<input type="hidden" name="action" value="login" />
            <input type="hidden" name="return_url" value="<?=$return_url?>"/>
			<? if ($ticket) {?>
			<input type="hidden" name="ticket" value="<?=$ticket?>"/>
			<?}?>

            <div class="form-button">
                <input name="Submit" type="submit" value="Login and save your domain">
                <a href="#" onclick="document.login.submit();"></a>
            </div>

        </form>
</div>
</body>
</html>
